/*	Usage:  request('login.php', {'password':pwd, 'username':un});
 * 
 */

function request(path, params, method) 
{
    method = method || "post";	// default post method
    
    var form = document.createElement("form");
    
    form.setAttribute("method", method);
    form.setAttribute("action", path);

     for(var key in params) {
        var hiddenField = document.createElement("input");
        hiddenField.setAttribute("type", "hidden");
        hiddenField.setAttribute("name", key);
        hiddenField.setAttribute("value", params[key]);

        form.appendChild(hiddenField);
    }

    document.body.appendChild(form);
    form.submit();
}



function requestPage(path, id, page, order)
{
	var params = new Array();
	
	params['checkcode'] ="scvd#!342";
	params['id'] 		= id;
	params['page'] 		= page;
	params['order'] 	= order;
		
	request(path, params, 'post');
}








